<template>
  <div class="container" ref="container"></div>
</template>

<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import bpmnStr from './demo.js'

let viewer: any
const container = ref<HTMLElement>()

onMounted(() => {
  import('bpmn-js').then(({ default: Viewer }) => {
    viewer = new Viewer({ container: container.value })
    viewer.importXML(bpmnStr)
  })
})
</script>

<style lang='scss' scoped>
.container {
  height: 400px;
}
</style>